public class Test06{
    public static int getMax(int[] arr){
        int max = arr[0];
        for(int i=1; i < arr.length; i++){
            if(arr[i] > max){
                max = arr[i];
            }
        }
        return max;
     }
    public static void main(String[] args){
        int[] array = new int[] {1,3,5,7,9};
        int max = getMax(array);
        System.out.println("The max number: " + max);

    }
}